<template>
   <div>
    <CategoryHeadVue them="订单查看"></CategoryHeadVue>
    <van-tabs v-model="active">
    <van-tab title="待付款">待付款</van-tab>
    <van-tab title="待收获">待收获</van-tab>
    <van-tab title="待评价">待评价</van-tab>
    <van-tab title="全部订单">
        <van-card
        num="2"
        :price="goods.originprice"
        :title="goods.proname"
        :desc="goods.time"
        :thumb="goods.img1"
        origin-price="10.00"
        v-for="goods in allgoods"
        :key="goods.orderid"
        >
        <template #num>
        <van-button type="warning" class="goapply">去支付</van-button>
        </template>
      </van-card>
     
    </van-tab>
    
    </van-tabs>
   </div>
</template>

<script>
import CategoryHeadVue from '@/components/Category-head.vue';
import axios from '@/Utils/server';
export default {
    name:"goodlook-vue",
    data(){
        return {
            active: 0,
            allgoods:[]
        }
    },
    components:{
        CategoryHeadVue,
        
    },
    created(){
        this.active = parseInt(this.$route.query.active)
        axios.get("/api/user/orderlist",{
            params:{
                userid:localStorage.getItem("userid")
            }
        })
        .then(res=>{
            if(res.data.code==200){
               this.allgoods = res.data.data
            }
        })
    }
}
</script>

<style scoped>
.goapply{
    width:4rem;
    height: 1rem;
    font-size: .6rem;
}
</style>